//
//  StatusPhotoView.m
//  Weibo
//
//  Created by Anasue on 9/18/15.
//  Copyright (c) 2015 Anasue. All rights reserved.
//

#import "StatusPhotoView.h"
#import "UIImageView+WebCache.h"
#import "Photo.h"

@implementation StatusPhotoView

- (id)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        self.userInteractionEnabled = YES;
        self.contentMode = UIViewContentModeScaleAspectFill;
        self.clipsToBounds = YES;

    }
    return self;
}

- (void)setPhoto:(Photo *)photo
{
    _photo = photo;
    [self setImageWithURL:[NSURL URLWithString:photo.thumbnail_pic] placeholderImage:[UIImage imageWithName:@"timeline_image_placeholder"]];
}

@end
